Conc-Trees for Functional and Parallel Programming
نویسندگان
چکیده
Parallel algorithms can be expressed more concisely in a functional programming style. This task is made easier through the use of proper sequence data structures, which allow splitting the data structure between the processors as easily as concatenating several data structures together. E cient update, split and concatenation operations are essential for declarative-style parallel programs. This paper shows a functional data structure that can improve the e ciency of parallel programs. The paper introduces two Conc-Tree variants: the Conc-Tree list, which provides worst-case O(logn) time lookup, update, split and concatenation operations, and the Conc-Tree rope, which additionally provides amortized O(1) time append and prepend operations. The paper demonstrates how Conc-Trees implement e cient mutable sequences, evaluates them against similar persistent and mutable data structures, and shows up to 3× performance improvements when applying Conc-Trees to data-parallel operations.
منابع مشابه
Conc-Trees for Functional and Parallel Programming Conc-Trees for Functional and Parallel Programming
Expressing parallel algorithms as functional programs has been a longstanding goal. This task is made easier through the use of proper sequence data structures, which allow splitting the data structure between the processors as easily as concatenating several data structures together. Efficient update, split and concatenation operations are essential for declarative-style parallel programs. Thi...
متن کاملParallel Generation of t-ary Trees
A parallel algorithm for generating t-ary tree sequences in reverse B-order is presented. The algorithm generates t-ary trees by 0-1 sequences, and each 0-1 sequences is generated in constant average time O(1). The algorithm is executed on a CREW SM SIMD model, and is adaptive and cost-optimal. Prior to the discussion of the parallel algorithm a new sequential generation with O(1) average time ...
متن کاملCoalgebraic Semantics for Parallel Derivation Strategies in Logic Programming
Logic programming, a class of programming languages based on first-order logic, provides simple and efficient tools for goal-oriented proof-search. Logic programming supports recursive computations, and some logic programs resemble the inductive or coinductive definitions written in functional programming languages. In this paper, we give a coalgebraic semantics to logic programming. We show th...
متن کاملA fuzzy mixed-integer goal programming model for a parallel machine scheduling problem with sequence-dependent setup times and release dates
This paper presents a new mixed-integer goal programming (MIGP) model for a parallel machine scheduling problem with sequence-dependent setup times and release dates. Two objectives are considered in the model to minimize the total weighted flow time and the total weighted tardiness simultaneously. Due to the com-plexity of the above model and uncertainty involved in real-world scheduling probl...
متن کاملOn the Granularity of Divide-and-Conquer Parallelism
This paper studies the runtime behaviour of various parallel divide-and-conquer algorithms written in a non-strict functional language, when three common granularity control mechanisms are used: a simple cut-off, a priority thread creation and a priority scheduling mechanism. These mechanisms use granularity information that is currently provided via annotations to improve the performance of th...
متن کامل